<template>
	<view class="content">
		<view class="box_bg" :style="'background: url('+ c_imgPath + 'indexBg.png'+ ') repeat-y 0 0 / 100% auto;'">

		</view>
		<!-- 发货须知 -->
		<view class="head">
			<view class="head_top">
				<view class="status_bar" :style="'height:'+ statusBarHeight +'px;'"></view>
				<view class="header_title">
					<view>
						<!-- @click="back()" <image :src="z_imgPath + 'back.png'"></image>返回 -->
					</view>
					<view class="hang1">盒柜赏品 </view>
				</view>
			</view>
			<!-- 功能切换 -->
			<view class="qiehuan_box">
				<view class="qiehuan">
					<view @click="getlist(i+1)" v-for="(v,i) in arr" :key="i">
						<view :class="show==i+1?'xzs':'wzs'">{{v}}</view>
						<view class="qiehuan_img">
							<image v-if="show==i+1" :src="c_imgPath+'qiehuan.png'"></image>
						</view>
					</view>
				</view>
				<!-- <image :src="c_imgPath + 'fhxz.png'" @click="$refs.shuoming.open()"></image>发货须知	 -->
			</view>
			<!-- 搜索 -->
			<view class="title_ipt">
				<image :src="c_imgPath+'search.png'"></image>
				<input type="text" placeholder="请输入关键字" placeholder-style="color:rgba(2555,255,255,0.6)"
					confirm-type="search" v-model="keyword" @confirm="search()" />
			</view>
			<view class="header" v-if="show != 3">
				<view>共 {{count}} 个赏品</view>
				<view>已选 <text> {{num}} </text>个赏品</view>
			</view>
		</view>
		<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"
			v-if="show != 3">
			<!-- 赏池预览 -->
			<view class="shop" v-for="(v,i) in goodsdata" :key='i'>
				<view class="shop_title">
					<image :src="v.goodslist_imgurl" @click="yulan(v)"></image>
					<view class="shop_item">
						<view class="shop_head hang1">
							<text>{{v.shang_title}}</text>{{v.goodslist_title}}
						</view>
						<view class="">
							可打包
							<!-- <text style="color: #B07CDD;font-size: 28rpx;margin: 0 10rpx 0 6rpx;">￥{{v.goodslist_money}}
							</text> -->
							<text v-if="show==2"> ({{v.goodslist_sale_time}}可发货)</text>
						</view>
						<view class="flex_center" style="justify-content: space-between;">
							<text>共{{v.prize_num}}个赏品</text>
							<uni-number-box :min="0" :max="v.prize_num" v-model="v.number" background="none"
								color="#FFFFFF" @change="getCount(v,i)">
							</uni-number-box>
						</view>
					</view>
				</view>
			</view>
		</mescroll-body>
		<view style="height: 100rpx;"></view>
		<!-- 底部按钮 -->
		<view class="footer" v-if="show != 3">
			<!-- <view class="footer_btn" @click="huisou_click()">
				<image :src="c_imgPath+'dabao.png'"></image>
			</view> -->
			<view class="footer_btn" @click="fahuo_click()" v-if="show!==2 && show<4">
				<image :src="c_imgPath+'fahuo.png'"></image>
			</view>
			<view class="footer_btn" @click="suo_click()" v-if="show<3">
				<image :src="c_imgPath+'shangsuo.png'"></image>
			</view>
			<view class="footer_btn" @click="jiesuo_click()" v-if="show==4">
				<image :src="c_imgPath+'jiesuo.png'"></image>
			</view>
			<!-- huisou_click -->
			<!-- <image :src="z_imgPath + 'qujiaoliu.png'" @click="toNewMp()" v-if="show<4" class="dabao"></image>
			<image :src="z_imgPath + 'shangsuo.png'" @click="suo_click()" v-if="show<3"></image>

			<image :src="z_imgPath + 'fahuo.png'" @click="fahuo_click()" v-if="show!==2 && show<4"></image>
			<image :src="z_imgPath + 'jiesuo.png'" @click="jiesuo_click()" v-if="show==4" class="jiesuo"></image> -->
		</view>

		<!-- 刷新浮框 -->
		<view class="xuanfu">
			<image :src="c_imgPath + 'shuaxin.png'" @click="getlist(show)"></image>
			<image :src="c_imgPath + 'xuzhi.png'" @click="$refs.shuoming.open()"></image>
			<image :src="c_imgPath + 'all_box.png'" @click="allList()"></image>
		</view>

		<!-- 发货说明 -->
		<uni-popup ref="shuoming" type="center">
			<view class="pop" :style="'background: url('+ c_imgPath + 'gz_bg.png'+ ') no-repeat 0 0 / 100% 100%;'">
				<view class="pop_title">发货须知</view>
				<view class="pop_con">
					<scroll-view scroll-y="true" style="height: 440rpx;">
						<view v-html="news"></view>
					</scroll-view>
				</view>
			</view>
			<view class="shuoming_close" @click="$refs.shuoming.close()" style="margin-top: 20rpx;">
				<image :src="u_imgPath + 'detail/close.png'"></image>
			</view>
		</uni-popup>

		<!-- 确认回收  -->
		<uni-popup ref="huishou_show" type="bottom">
			<view class="order animated fadeInUp">
				<view class="order_title"
					:style="'background: url('+ c_imgPath + 'pop_title_bg.png'+ ') repeat 0 0 / 100% 100%;'">
					<!-- <image :src="z_imgPath + 'qrhs.png?11'"></image> -->
					<view class="order_title_text">确认打包</view>
					<view class="ca" @click="$refs.huishou_show.close()">×</view>
				</view>
				<view class="xuyuan">
					<view class="xuyuan_head">
						<view>已选赏品</view>
						<view>共 <text style="font-size: 28rpx;color: #B07CDD;">{{num}}</text> 件</view>
					</view>
					<view class="xuyuan_con">
						<view class="xuyuan_item" v-for="(item,index) in huishou_Arr" :key="index">
							<view class="shop_item_img">
								<image :src="item.goodslist_imgurl"></image>
								<view>
									<text>{{item.shang_title}}×{{item.number}}</text>
								</view>
							</view>
							<view class="xuyuan_item_2 hang1" style="font-size: 20rpx;">
								打包价:{{item.goodslist_money*item.number}}元
							</view>
						</view>
					</view>
					<view class="xuyuan_foot">
						<view>小计:￥<text style="font-size: 32rpx;">{{zong_price.toFixed(2)}}</text></view>
					</view>
				</view>
				<view class="pop_huishou" @click="huisou_btn()"
					:style="'background: url('+ c_imgPath + 'pop_btn_bg.png'+ ') repeat 0 0 / 100% 100%;'">
					<text>确认打包</text>
				</view>
				<!-- <image :src="z_imgPath + 'qrhs_btn.png?11'" class="pop_huishou" @click="huisou_btn()"></image> -->
			</view>
		</uni-popup>

		<!-- 发货确认单 -->
		<uni-popup ref="fahuo_show" type="bottom">
			<view class="order animated fadeInUp">
				<view class="order_title"
					:style="'background: url('+ c_imgPath + 'pop_title_bg.png'+ ') repeat 0 0 / 100% 100%;'">
					<!-- <image :src="z_imgPath + 'qrfh.png'"></image> -->
					<view class="order_title_text">确认发货</view>
					<view class="ca" @click="$refs.fahuo_show.close()">×</view>
				</view>
				<view class="xuyuan">
					<view class="xuyuan_head">
						<view>已选赏品</view>
						<view>共 <text style="font-size: 28rpx;color: #B07CDD;">{{num}}</text> 件</view>
					</view>
					<view class="xuyuan_con" style="border: none;">
						<view class="xuyuan_item" v-for="(item,index) in huishou_Arr" :key="index">
							<view class="shop_item_img">
								<image :src="item.goodslist_imgurl"></image>
								<view>
									<text>{{item.shang_title}}</text>
								</view>
							</view>
							<view class="xuyuan_item_2 hang1"> {{item.goodslist_title}}</view>
						</view>
					</view>
				</view>
				<view class="xuyuan kuaidi">
					<view class="flex_center" style="justify-content: space-between;">
						<view style="width: 580rpx;font-size: 28rpx;" @click="showMulLinkageThreePicker()">
							{{selectCity}}
						</view>
						<image :src="z_imgPath + 'point_r.png'"></image>
					</view>
					<view>满{{post.free_post}}件赏品包邮</view>
					<view class="kuaidi_text">如果不满{{post.free_post}}件，需支付{{post.post_money}}元运费</view>
					<textarea placeholder="请输入留言内容" maxlength="50" v-model="message"></textarea>
				</view>
				<view class="pop_huishou" @click="fahuo_btn()"
					:style="'background: url('+ c_imgPath + 'pop_btn_bg.png'+ ') repeat 0 0 / 100% 100%;'">
					<text>确认发货</text>
				</view>
				<!-- <image :src="c_imgPath + 'pop_btn_bg.png'" class="pop_huishou" @click="fahuo_btn()"></image> -->
			</view>
		</uni-popup>

		<!-- 地址列表 -->
		<uni-popup ref="address_show" type="bottom">
			<view class="order animated fadeInUp">
				<!-- 头部 -->
				<view class="order_title">
					<view>地址列表</view>
					<view class="ca" @click="$refs.address_show.close()">×</view>
				</view>
				<scroll-view scroll-y="true" class="ul">
					<view class="li" v-for="(v,i) in address_list" :key='i'>
						<view class="li_name" @click="select_address(v)">
							<view class="flex_center">
								<text v-if="v.is_default">默认</text> {{v.name}} {{v.mobile}}
							</view>
							<view style="font-size: 24rpx;margin-top: 16rpx;color: #999999;">
								{{v.province}} {{v.city}} {{v.county}} {{v.address}}
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
		</uni-popup>
		<!-- 详情弹窗 -->
		<uni-popup ref="yulanPop" type="center" mask-background-color="rgba(0,0,0,.95)">
			<view class="yulanStyle" :style="'background: url('+ c_imgPath + 'ylBg.png'+ ') repeat-y 0 0 / 100% 100%;'">
				<view class="yulanStyle_title">{{yulan_news.shang_title}}</view>
				<view>
					<image style="width: 466rpx;height: 654rpx;" :src="yulan_news.goodslist_imgurl" mode="widthFix">
					</image>
				</view>
			</view>
			<view class="hang1 bomText"
				:style="'background: url('+ c_imgPath + 'textBg.png'+ ') repeat-y 0 0 / 100% 100%;'">
				{{yulan_news.goodslist_title}}
			</view>
			<view class="shuoming_close" @click="$refs.yulanPop.close()" style="margin-top: 20rpx;">
				<image :src="u_imgPath + 'detail/close.png'"></image>
			</view>
		</uni-popup>
		<!-- 自定义底部 -->
		<!-- <tabbar :type="3"></tabbar> -->
	</view>

</template>

<script>
	import tabbar from '@/components/tabbar/tabbar.vue'
	export default {
		components: {
			tabbar
		},
		data() {
			return {
				z_imgPath: this.$z_img + 'hegui/',
				c_imgPath: 'https://qt.yhemall.com/hegui/',
				u_imgPath: 'https://qt.yhemall.com/',
				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
				keyword: '',
				selectCity: '选择收货地址',
				downOption: {
					auto: false
				},
				arr: ['赏品', '预售', '卡册', '保险柜'],
				show: 1,
				number: [0],
				id: '',
				// 发货须知
				news: '',
				// 赏品总量
				count: '?',
				// 已选赏品数量
				num: 0,
				// 赏品数据
				goodsdata: [],
				post: {},
				// 寄卖的商品
				huishou_Arr: [],
				// 寄卖总价
				zong_price: 0,
				// 发送打包参数
				recovery_info: [],
				// 收货人姓名
				name: '',
				// 收货人电话
				mobile: '',
				// 收货地址
				address: '',
				// 留言
				message: '',
				// 地址列表
				address_list: [],
				address_id: '',
				// 打包失效
				dh_status: false,
				// 发货失效
				fh_status: false,
				// 上锁失效
				suo_status: false,
				// 解锁失效
				jiesuo_status: false,
				// 放大详情
				yulan_news: {},
				// 
				startX: 1,
				endX: 0,

			}
		},
		onLoad(v) {
			this.getDanye(8)
		},
		// onShow() {
		// 	this.loadData(1)
		// },

		onHide() {
			// this.$refs.pop_show.close()
			// this.$refs.huishou_show.close()
			// this.$refs.fahuo_show.close()
			// this.$refs.address_show.close()
		},
		watch: {
			huishou_Arr() {
				this.num = 0;
				this.zong_price = 0;
				for (let i = 0; i < this.huishou_Arr.length; i++) {
					this.$nextTick(() => {
						this.num += this.huishou_Arr[i].number
						this.zong_price += parseFloat(this.huishou_Arr[i].goodslist_money * this.huishou_Arr[i]
							.number)
					})
				}
				this.getrecovery_info()
			}
		},

		methods: {
			yulan() {
				let that = this;
				that.req({
					url: 'recovery_money',
					data: {
						recovery_info: JSON.stringify(that.recovery_info),
						type: that.show,
						dh_type: that.duihuan_type
					},
					Loading: true,
					success(res) {
						if (res.status == 1) {
							that.zong_price = res.data;
							that.$refs.huishou_show.open()
						}
					}
				})
			},
			//全选
			allList() {
				for (let i = 0; i < this.goodsdata.length; i++) {
					this.$set(this.goodsdata[i], 'number', this.goodsdata[i].prize_num)
				}
				this.huishou_Arr = this.goodsdata;
			},
			change_dis(e) {
				if (this.goodsdata[e].dis == 1) {
					this.$set(this.goodsdata[e], 'dis', this.goodsdata[e].orderlist_length)
				} else {
					this.$set(this.goodsdata[e], 'dis', 1)
				}
			},
			touchEnd(e) {
				if (e) {
					this.endX = e.changedTouches[0].pageX
				}
				console.log(this.endX)
				let aaaa = this.endX - this.startX
				if (aaaa > 30) {
					console.log(aaaa)
					uni.redirectTo({
						url: "/pages/shouye/index"
					})
				}
			},

			/**
			 * @description: 触摸起点
			 * @return {*}
			 */
			touchStart(e) {
				this.startX = e.changedTouches[0].pageX
				console.log(this.startX)
			},

			toNewMp() {
				uni.navigateToMiniProgram({
					appId: uni.getStorageSync('jump_appid'), // 此为生活缴费appid
					path: 'pages/my/index?token=' + uni.getStorageSync('token'), // 此为生活缴费首页路径
					envVersion: "release",
					extraData: {
						'token': uni.getStorageSync('token')
					},
					success: res => {
						// 打开成功
						console.log("打开成功", res);
					},
					fail: err => {
						console.log(err);
					}
				})
			},
			getDanye(e) {
				let that = this;
				that.req({
					url: 'danye',
					data: {
						type: e
					},
					success(res) {
						that.news = res.data
					}
				})
			},
			yulan(e) {
				console.log(e)
				this.yulan_news = e
				this.$refs.yulanPop.open();
			},

			getCount(a, b) {
				console.log(a);
				console.log(b);
				console.log('-----------------------');
				this.$nextTick(() => {
					this.change_Arr()
				})
			},
			// 改变数组
			change_Arr() {
				let that = this;
				that.huishou_Arr = [];
				for (let i = 0; i < that.goodsdata.length; i++) {
					if (that.goodsdata[i].number > 0) {
						that.huishou_Arr.push(that.goodsdata[i])
					}
					// for (let j = 0; j < this.goodsdata[i].orderlist.length; j++) {
					// 	if (that.goodsdata[i].orderlist[j].number > 0) {
					// 		that.huishou_Arr.push(that.goodsdata[i].orderlist[j])
					// 	}
					// }
				}
			},

			fahuo_btn() {
				let that = this;
				if (that.fh_status) {
					return
				}
				if (that.recovery_info && that.recovery_info.length > 0) {
					that.fh_status = true
					that.req({
						url: 'warehouse_send',
						data: {
							recovery_info: JSON.stringify(that.recovery_info),
							name: that.name,
							mobile: that.mobile,
							address: that.address,
							message: that.message,
							type: 1
						},
						success(res) {
							if (res.status == 1) {
								if (res.data.status == 1) {
									that.recovery_info = []
									uni.requestPayment({
										provider: 'wxpay',
										timeStamp: res.data.res.timeStamp,
										nonceStr: res.data.res.nonceStr,
										package: res.data.res.package,
										signType: 'MD5',
										paySign: res.data.res.paySign,
										complete(ress) {
											if (ress.errMsg == 'requestPayment:fail cancel') {
												uni.showToast({
													title: '取消支付',
													icon: 'loading',
													duration: 1000
												})
											}
											if (ress.errMsg == 'requestPayment:ok') {
												uni.showToast({
													title: res.msg,
													icon: 'success',
													duration: 2000,
													success() {
														setTimeout(() => {
															that.$refs.fahuo_show.close()
															that.mescroll.resetUpScroll()
														}, 1000)
													}
												})
											}
										},
									})

								} else {
									that.recovery_info = []
									uni.showToast({
										title: res.msg,
										icon: 'success',
										duration: 2000,
										success() {
											setTimeout(() => {
												that.$refs.fahuo_show.close()
												that.mescroll.resetUpScroll()
											}, 1000)
										}
									})
								}
							}
						},
						complete() {
							that.fh_status = false
						}
					})
				}
			},
			huisou_btn() {
				let that = this;
				if (that.dh_status) {
					return
				}
				if (that.recovery_info && that.recovery_info.length > 0) {
					that.dh_status = true
					that.req({
						url: 'warehouse_recovery',
						data: {
							recovery_info: JSON.stringify(that.recovery_info),
							type: that.show
						},
						success(res) {
							if (res.status == 1) {
								that.recovery_info = []
								uni.showToast({
									title: res.msg,
									icon: 'success',
									duration: 2000,
									success() {
										setTimeout(() => {
											that.$refs.huishou_show.close()
											that.loadData(1)
										}, 1000)
									}
								})
							}
						},
						complete() {
							that.dh_status = false
						}
					})
				}
			},

			quanxuan_click() {
				this.num = this.count
				for (let i = 0; i < this.goodsdata.length; i++) {
					for (let j = 0; j < this.goodsdata[i].orderlist.length; j++) {
						this.$set(this.goodsdata[i].orderlist[j], 'number', this.goodsdata[i].orderlist[j].prize_num)
					}
				}

			},
			suo_click() {
				this.change_Arr()
				if (this.huishou_Arr.length > 0) {
					this.getrecovery_info()
					let that = this;
					console.log(that.recovery_info);
					console.log('-----------1-----------------');
					if (that.suo_status) {
						return
					}
					if (that.recovery_info && that.recovery_info.length > 0) {
						that.suo_status = true
						that.req({
							url: 'warehouse_movein',
							data: {
								recovery_info: JSON.stringify(that.recovery_info),
							},
							success(res) {
								if (res.status == 1) {
									that.recovery_info = []
									uni.showToast({
										title: res.msg,
										icon: 'success',
										duration: 2000,
										success() {
											setTimeout(() => {
												that.loadData(1)
											}, 1000)
										}
									})
								}
							},
							complete() {
								that.suo_status = false
							}
						})
					}
				} else {
					uni.showToast({
						title: '请至少选择一件赏品',
						icon: 'none',
						duration: 2000
					})
				}
			},
			jiesuo_click() {
				this.change_Arr()
				if (this.huishou_Arr.length > 0) {
					this.getrecovery_info()
					let that = this;
					if (that.jiesuo_status) {
						return
					}
					if (that.recovery_info && that.recovery_info.length > 0) {
						that.jiesuo_status = true
						that.req({
							url: 'warehouse_remove',
							data: {
								recovery_info: JSON.stringify(that.recovery_info),
							},
							success(res) {
								if (res.status == 1) {
									that.recovery_info = []
									uni.showToast({
										title: res.msg,
										icon: 'success',
										duration: 2000,
										success() {
											setTimeout(() => {
												that.loadData(1)
											}, 1000)
										}
									})
								}
							},
							complete() {
								that.jiesuo_status = false
							}
						})
					}
				} else {
					uni.showToast({
						title: '请至少选择一件赏品',
						icon: 'none',
						duration: 2000
					})
				}
			},

			fahuo_click() {
				this.change_Arr()
				if (this.huishou_Arr.length > 0) {
					this.getrecovery_info()
					this.$refs.fahuo_show.open()
				} else {
					uni.showToast({
						title: '请至少选择一件赏品',
						icon: 'none',
						duration: 2000
					})
				}
			},
			huisou_click() {
				// uni.navigateToMiniProgram({
				// 	appId: uni.getStorageSync('jump_appid'), // 此为生活缴费appid
				// 	path: 'pages/my/index?token=' + uni.getStorageSync('token'), // 此为生活缴费首页路径
				// 	envVersion: "develop",
				// 	extraData: {
				// 		'token': uni.getStorageSync('token')
				// 	},
				// 	success: res => {
				// 		// 打开成功
				// 		console.log("打开成功", res);
				// 	},
				// 	fail: err => {
				// 		console.log(err, '取消了');
				// 		uni.switchTab({
				// 			url: '/pages/shouye/index'
				// 		})
				// 	}
				// })
				this.change_Arr()
				if (this.huishou_Arr.length > 0) {
					this.getrecovery_info()
					this.$refs.huishou_show.open()
				} else {
					uni.showToast({
						title: '请至少选择一件赏品',
						icon: 'none',
						duration: 2000
					})
				}
			},
			// 获取参数
			getrecovery_info() {
				let that = this;
				that.recovery_info = [];
				for (let i = 0; i < that.huishou_Arr.length; i++) {
					that.recovery_info.push({
						'prize_code': that.huishou_Arr[i].prize_code,
						'number': that.huishou_Arr[i].number
					})
				}
			},
			search() {
				this.mescroll.resetUpScroll()
			},
			getlist(v) {
				if (v == 3) {
					//去卡册
					uni.navigateTo({
						url: '/pages/chouka/kace'
					})
				} else {
					this.show = v;
					this.keyword = ''
					this.goodsdata = []
					this.mescroll.resetUpScroll()
				}

			},
			downCallback() {
				this.mescroll.resetUpScroll()
			},
			upCallback(page) {
				this.loadData(page.num);
			},
			loadData(pageNo) {
				let that = this;
				that.num = 0;
				that.huishou_Arr = [];
				that.req({
					url: 'warehouse_index',
					data: {
						page: pageNo,
						type: that.show,
						keyword: that.keyword
					},
					success(res) {
						console.log(res.data.data.data);
						console.log('-------------------');
						if (res.status == 1) {
							that.count = res.data.total
							that.post = res.data.yufei
							that.mescroll.endByPage(res.data.data.data.length, res.data.data.last_page);
							if (pageNo == 1) {
								that.goodsdata = res.data.data.data;
							} else {
								that.goodsdata = that.goodsdata.concat(res.data.data.data);
							}
						}
						for (let i = 0; i < that.goodsdata.length; i++) {
							that.$set(that.goodsdata[i], 'number', 0)
							// for (let j = 0; j < that.goodsdata[i].orderlist.length; j++) {
							// 	that.$set(that.goodsdata[i].orderlist[j], 'number', 0)
							// }

						}
					}
				})
			},

			select_address(res) {
				// console.log(res)
				let that = this
				that.selectCity = res.name + '-' + res.province + '-' + res.city + '-' + res
					.county + '-' + res.address + '-' + res.mobile
				that.name = res.name
				that.mobile = res.mobile
				that.address = res.province + '-' + res.city + '-' + res.county + '-' + res
					.address
				that.address_id = res.id
				that.$refs.address_show.close()
				setTimeout(() => {
					that.$refs.fahuo_show.open()
				}, 300)
			},
			getAddress() {
				let that = this;
				that.req({
					url: 'address',
					Loading: true,
					success(res) {
						if (res.status == 1) {
							that.address_list = res.data;
							if (that.address_list.length > 0) {
								that.$refs.address_show.open()
								setTimeout(() => {
									that.$refs.fahuo_show.close()
								}, 300)
							} else {
								uni.showToast({
									title: '请先去添加地址~',
									icon: 'none',
								})
							}
						}
					}
				})
			},
			/*三级联动选择*/
			showMulLinkageThreePicker() {
				console.log("di")
				let that = this;
				uni.chooseAddress({
					success(res) {
						console.log(res)
						that.selectCity = res.userName + '-' + res.provinceName + '-' + res.cityName + '-' + res
							.countyName + '-' + res.detailInfo + '-' + res.telNumber

						that.name = res.userName;
						that.mobile = res.telNumber;
						that.address = res.provinceName + '-' + res.cityName + '-' + res.countyName + '-' + res
							.detailInfo;
						// that.$refs.fahuo_show.open()
					},
					fail(res) {
						console.log(res)
					}
				})
			},
			back() {
				let route = uni.getStorageSync('page')
				if (route == 'pages/shouye/index' || route == 'pages/chouka/index' || route == 'pages/user/index') {
					uni.switchTab({
						url: '/' + route
					})
				} else {
					uni.navigateBack()
				}
				// uni.navigateBack()
				// uni.switchTab({
				// 	url: '/pages/shouye/index'
				// })
			}



		}
	}
</script>

<style lang="scss">
	.yulanStyle_title {
		font-size: 32rpx;
		font-family: Source Han Sans CN;
		font-weight: bold;
		color: #B75AFF;
		-webkit-text-stroke: 3rpx #FFFFFF;
		text-stroke: 3rpx #FFFFFF;
		padding: 8rpx 26rpx;
		width: fit-content;
		position: absolute;
		background-color: rgba(0, 0, 0, 0.6);
		border-radius: 24rpx;
		margin: 36rpx 0 0 30rpx;
	}

	.bomText {
		font-size: 28rpx;
		text-align: center;
		height: 68rpx;
		line-height: 68rpx;
		color: #ffffff;
		margin-top: 100rpx;
	}

	.yulanStyle {
		width: 516rpx;
		font-size: 47rpx;
		font-family: Source Han Sans CN;
		font-weight: bold;
		color: #FFFFFF;
		text-align: center;

		image {
			margin: 25rpx 26rpx;
			border-radius: 20rpx;
			margin-bottom: 10rpx;
		}
	}

	.ul {
		width: 690upx;
		margin: 0 auto;
		max-height: 900rpx;
	}

	.li {
		width: 100%;
		display: flex;
		justify-content: space-between;
		padding: 30rpx 24rpx;
		box-sizing: border-box;
		margin-top: 20rpx;
		background: #000916;
		border: 1px solid rgba(47, 180, 255, 0.7000);
		box-shadow: 0px 0px 12rpx 0px rgba(47, 180, 255, 0.7000);
		border-radius: 10rpx;
		color: #ffffff;
	}

	.li_name {
		font-size: 32upx;
		// font-weight: bold;
		width: 100%;
		color: #ffffff;
	}

	.li_name text {
		padding: 6rpx 10rpx;
		color: #FFFFFF;
		background: #2FB4FF;
		border-radius: 10rpx;
		margin-right: 20rpx;
		font-size: 24rpx;
	}

	textarea {
		width: 100%;
		height: 120rpx;
		background: rgba(255, 255, 255, 0.08);
		border-radius: 10rpx;
		padding: 4rpx 10rpx;
		margin-top: 20rpx;
		font-size: 26rpx;
		box-sizing: border-box;
	}

	.kuaidi_text {
		font-size: 24rpx;
		color: #999999;
	}

	.kuaidi>view:nth-of-type(2) {
		font-size: 28rpx;
	}

	.kuaidi>view:nth-of-type(1) {
		border-bottom: 1rpx solid #666666;
		padding: 20rpx 0;
	}

	.kuaidi>view {
		margin-top: 20rpx;
	}

	.kuaidi image {
		width: 32rpx;
		height: 32rpx;
	}

	.kuaidi {
		padding: 0 30rpx 30rpx 30rpx !important;
		color: #ffffff;
	}

	.order_title>image {
		width: 275rpx;
		height: 88rpx;
		position: absolute;
		left: 30rpx;
		top: -44rpx;
	}

	.order_title {
		font-size: 50rpx;
		height: 88rpx;
		font-family: Source Han Sans CN;
		font-weight: bold;
		color: #FFFFFF;
		position: relative;
		text-align: right;

		.order_title_text {
			background: linear-gradient(0deg, #B18DD6 0%, #FFFFFF 100%);
			-webkit-background-clip: text;
			-webkit-text-fill-color: transparent;
			font-family: PangMenZhengDao;
			font-size: 40rpx;
			text-align: center;
			line-height: 88rpx;
		}

		.ca {
			position: absolute;
			top: 10rpx;
			right: 20rpx;
		}
	}

	.order {
		width: 750rpx;
		background: rgba(0, 0, 0, 0.9);
		border-radius: 30rpx 30rpx 0px 0px;
		border-bottom: none;
		position: absolute;
		bottom: 0;
		// padding: 10rpx 30rpx 50rpx;
		box-sizing: border-box;
		color: #FFFFFF;
	}

	.pop_huishou {
		width: 690rpx;
		height: 78rpx;
		margin: 48rpx auto;
		display: block;
		text-align: center;
		line-height: 78rpx;

		text {
			background: linear-gradient(0deg, #B75AFF 0%, #FFFFFF 100%);
			-webkit-background-clip: text;
			-webkit-text-fill-color: transparent;
			font-size: 32rpx;
			font-weight: bold;
		}
	}

	.xuyuan_foot {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		padding: 30rpx;
		font-size: 24rpx;
		color: #FFFFFF;
		text-shadow: 0px 0px 14rpx #FF2121;
	}

	.xuyuan_item_2 {
		color: #ffffff;
		font-size: 24rpx;
		margin-top: 6rpx;
		width: 100%;
	}


	.shop_item_img>view:nth-of-type(1) {
		position: absolute;
		bottom: 0;
		left: 0;
		font-size: 20rpx;
		padding: 2rpx 30rpx 2rpx 10rpx;
		box-sizing: border-box;
		background: #000000;
		text-align: center;
		opacity: 0.8;
		width: 100%;
		border-radius: 0 0 8rpx 8rpx;

		text {
			background: linear-gradient(0deg, #B75AFF 0%, #E7CBFF 100%);
			-webkit-background-clip: text;
			-webkit-text-fill-color: transparent;
		}
	}

	.shop_item_img>image {
		width: 100%;
		height: 100%;
		border-radius: 8rpx;
		position: absolute;
		top: 0;
		left: 0;
	}

	.shop_item_img {
		width: 170rpx;
		height: 170rpx;
		border-radius: 10rpx 10rpx 0 0;
		position: relative;
		text-align: left;
		box-sizing: border-box;
		overflow: hidden;
	}

	.xuyuan_item {
		width: 170rpx !important;
		min-width: 170rpx;
		height: 242rpx;
		margin-right: 20rpx;
		flex-shrink: 0;
		text-align: center;
		position: relative;
		margin-top: 20rpx;
	}

	.xuyuan_con {
		display: flex;
		margin: 14rpx auto 0;
		width: 630rpx;
		box-sizing: border-box;
		border-bottom: 1px solid #666666;
		overflow-x: scroll;
		overflow-y: hidden;
	}

	.xuyuan_head>view:nth-of-type(2) {
		font-size: 24rpx;
	}

	.xuyuan_head {
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 28rpx;
		padding: 0 24rpx;
		box-sizing: border-box;
		color: #ffffff;
	}

	.xuyuan {
		width: 690rpx;
		/* height: 432rpx; */
		background: #09081C;
		border: 1px solid #FFFFFF;
		border-radius: 1rpx;
		margin: 24rpx auto 0;
		padding-top: 24rpx;
		box-sizing: border-box;
	}

	.pop_btn {
		width: 484rpx;
		height: 68rpx;
		background: #000000;
		border: 1px solid #2FB4FF;
		border-radius: 6rpx;
		font-size: 32rpx;
		color: #2FB4FF;
		margin: 50rpx auto 0;
		display: flex;
		justify-content: center;
		align-items: center;
	}


	.pop_con {
		height: 440rpx;
		margin: auto;
		padding: 0rpx 36rpx;
		font-size: 24rpx;
		line-height: 36rpx;
		color: #FFFFFF;
		box-sizing: border-box;
		overflow-y: scroll;
	}

	.pop_title {
		/* font-family: 'zcq'; */
		font-size: 40rpx;
		color: #96FFFE;
		height: 128rpx;
		line-height: 128rpx;
		text-align: center;
	}

	.pop {
		width: 543rpx;
		height: 801rpx;
		box-sizing: border-box;

		/* background: #FFFFFF; */
		/* border-radius: 20rpx; */
		.pop_title {
			font-size: 32rpx;
			font-weight: bold;
			font-family: Source Han Sans CN;
			padding-top: 50rpx;
			background: linear-gradient(0deg, #A98FD3 0%, #E7CBFF 50%);
			-webkit-background-clip: text;
			-webkit-text-fill-color: transparent;
		}
	}

	.mengban {
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 999;
		background: rgba(0, 0, 0, 0.45);
		display: flex;
		justify-content: center;
		align-items: center;
	}


	.footer>image {
		width: 227rpx;
		height: 97rpx;
	}

	// .footer>image:nth-of-type(3) {
	// 	width: 317rpx;
	// 	height: 106rpx;
	// 	position: absolute;
	// 	top: 20rpx;
	// 	left: 0;
	// 	right: 0;
	// 	margin: auto;
	// 	z-index: 11;
	// }

	.jiesuo {
		margin: auto;
	}

	.footer {
		width: 100%;
		display: flex;
		align-items: center;
		position: relative;
		position: fixed;
		bottom: 40rpx;
		right: 0;
		left: 0;
		margin: auto;
		display: flex;
		align-items: center;

		.footer_btn {
			flex: 1;
			text-align: center;

			image {
				width: 210rpx;
				height: 78rpx;
			}
		}
	}


	button::after {
		border: none;
	}

	button {
		background-color: transparent;
		padding-left: 0;
		padding-right: 0;
		line-height: inherit;
		border-radius: 0;
	}

	.xuanfu image {
		width: 90rpx;
		height: 100rpx;
		margin-top: 20rpx;
	}

	.xuanfu {
		position: fixed;
		bottom: 391rpx;
		left: 20rpx;
		width: 77rpx;
		z-index: 21;
	}


	.shop_head>text {
		background: linear-gradient(0deg, #B55AFF 0%, #E5C7FF 100%);
		border-radius: 10rpx;
		padding: 2rpx 20rpx;
		font-size: 24rpx;
		margin-right: 10rpx;
		box-sizing: border-box;
	}

	.shop_head {
		font-size: 32rpx;
		/* height: 80rpx; */
		margin-bottom: 10rpx;
	}

	.shop_item {
		display: flex;
		justify-content: space-between;
		flex-direction: column;
		width: 460rpx;
		/* border: 1rpx solid red; */
	}

	.shop_title>image {
		width: 140rpx;
		height: 140rpx;
		margin-right: 20rpx;
		border-radius: 10rpx;
	}

	.shop_title {
		display: flex;
	}

	.shop {
		width: 690rpx;
		margin: 20rpx auto;
		background: #262B4F;
		border: 2rpx solid;
		border-image: linear-gradient(0deg, #5D5868, #92949A) 10 10;
		font-size: 24rpx;
		padding: 30rpx;
		box-sizing: border-box;
		border-radius: 1rpx;
		color: #FFFFFF;
	}

	.goods_title image {
		width: 40rpx;
		height: 26rpx;
	}

	.goods_title>view {
		/* background: #B07CDD; */
		width: 40rpx;
		height: 40rpx;
	}

	.goods_title {
		width: 690rpx;
		margin: 20rpx auto;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.title_ipt {
		display: flex;
		align-items: center;
		margin: 20rpx auto;
		border-radius: 30rpx;
		padding-left: 30rpx;
		width: 690rpx;
		height: 58rpx;
		background: rgba(#999999, 0.6);
		/* border: 1rpx solid #96FFFE; */
		border-radius: 30rpx;
		box-sizing: border-box;
	}

	.title_ipt>image {
		width: 26rpx;
		height: 26rpx;
	}

	.title_ipt>input {
		width: 90%;
		height: 60rpx;
		box-sizing: border-box;
		border-radius: 105rpx;
		font-size: 28rpx;
		line-height: 60rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: rgba(255, 255, 255, 0.6);
		padding-left: 20rpx;
	}

	.qiehuan_box {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-top: 20rpx;
		width: 750rpx;
		padding: 0 30rpx;
		box-sizing: border-box;
		color: #FFFFFF;
		font-size: 24rpx;
	}

	.qiehuan_box>image {
		width: 153rpx;
		height: 67rpx;
	}

	.qiehuan {
		display: flex;
		justify-content: space-around;
		width: 450rpx;
		font-weight: bold;
		font-family: YouSheBiaoTiHei;

		.qiehuan_img {
			height: 24rpx;

			image {
				width: 94rpx;
				height: 24rpx;
			}
		}
	}

	.qiehuan>view {
		flex: 1;
		text-align: center;
	}

	.wzs {
		font-size: 28rpx;
		color: #9E99E3;
	}

	.xzs {
		font-size: 32rpx;
		background: linear-gradient(0deg, #B75AFF 0%, #E7CBFF 100%);
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
	}


	.header text {
		color: #B07CDD;
		margin: 0 6rpx;
	}

	.header {
		width: 690rpx;
		margin: 20rpx auto 0;
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 24rpx;
		color: #999999;
	}


	.header_title>view:nth-of-type(2) {
		width: 100%;
		text-align: center;
		/* margin: auto; */
	}

	.header_title>view:nth-of-type(1) {
		display: flex;
		align-items: center;
	}

	.header_title image {
		width: 48rpx;
		height: 48rpx;
	}

	.header_title {
		height: 70rpx;
		line-height: 70rpx;
		width: 100%;
		box-sizing: border-box;
		font-weight: bold;
		display: flex;
		align-items: center;
		padding-left: 30rpx;
		box-sizing: border-box;
		font-size: 32rpx;
		color: #ffffff;
	}

	.status_bar {
		height: var(--status-bar-height);
		width: 100%;
	}

	.head_top {
		/* #ifndef MP */
		margin-top: 44rpx;
		/* #endif */
	}

	.head {
		width: 750rpx;
		height: 386rpx;
		background: #09081C;
		padding-bottom: 14rpx;
		font-size: 28rpx;
		color: #333333;
		box-sizing: border-box;
		position: fixed;
		top: 0;
		z-index: 15;
	}

	.content {
		padding-bottom: 160rpx;
		min-height: 100vh;
		width: 100vw;
		padding-top: 386rpx;
		box-sizing: border-box;
	}
</style>